﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.OracleClient;
namespace BenefitHelper.Data.ServerData
{
    /// <summary>
    /// 经纪公司表
    /// </summary>
    public class T_BrokenAddr
    {
        /// <summary>
        /// 编号
        /// </summary>
        public int Idx { get; set; }
        /// <summary>
        /// 经纪公司代码
        /// </summary>
        public string BrokenId { get; set; }
        /// <summary>
        /// 服务器类型
        /// </summary>
        public int ServerType { get; set; }
        /// <summary>
        /// 服务器地址
        /// </summary>
        public string ServerAddr { get; set; }
        /// <summary>
        /// 经纪公司名称
        /// </summary>
        public string BrokenName { get; set; }
        /// <summary>
        /// 得到所有经纪公司代码和名称
        /// </summary>
        /// <returns></returns>
        public List<T_BrokenAddr> GetList()
        {
            string sql = "select distinct BrokenName,BrokenId from T_BrokenAddr";
            OracleDataReader sdr = Common.ADO.Tools.OracleHelper.ExecuteReader(sql);
            List<T_BrokenAddr> a = new List<T_BrokenAddr>();
            while (sdr.Read())
            {
                T_BrokenAddr b = new T_BrokenAddr();
                b.BrokenId = sdr["BrokenId"].ToString();
                b.BrokenName = sdr["BrokenName"].ToString();
                a.Add(b);
            }
            sdr.Close();
            return a;
        }


    }
}
